import http from '../utils/http';

export function getPersonnel(params) {
    return http.get('/api/hr/personnel', params);
}

export function addPersonnel(params) {
    return http.post('/api/hr/personnel', params);
}

export function updatePersonnel(params) {
    return http.put(`/api/hr/personnel/${params.id}`, params);
}

export function delPersonnel(params) {
    return http.delete(`/api/hr/personnel/${params.id}`, params);
}

export function getPersonnelDetail(params) {
    return http.get(`/api/hr/personnel/${params.id}`, params);
}

export function getPersonnelDownload(params) {
    return http.get('/api/hr/personnel/download', params);
}
export function addEducation(params) {
    return http.post('/api/hr/education', params);
}
export function addTraining(params) {
    return http.post('/api/hr/training', params);
}
export function addWork(params) {
    return http.post('/api/hr/work', params);
}
export function getPersonnelById(params) {
    return http.get('/api/hr/personnel/detail', params)
}
